<?php $toolbarList = array(
	array('uri' => 'javascript:void(0);', 'title' => $this->lang->line('save'), 'class' => 'ico-save'),
	array('uri' => $link_back, 'title' => $this->lang->line('cancel'), 'class' => 'ico-cancel'),
)?>
<?php require_once 'commons/toolbar.php';?>
<div class="success"><?=$message;?></div>
<form id="frmEditAddData" method="post" action="<?=$action;?>">
<div class="data">
<table class="wrapper">
	<tr>
		<td width="20%"><?=$this->lang->line('id');?></td>
		<td><input type="text" name="id" disabled class="short_text" value="<?php echo $this->validation->id; ?>"/>
		<input type="hidden" name="id" value="<?php echo $this->validation->id; ?>" /></td>
	</tr>
	<tr>
		<td valign="top"><?=$this->lang->line('parent-category');?><span class="required"> *</span></td>
		<td>
			<select id="parent_id" name="parent_id" class="medium_text" >
				<option value="0" <?=$this->validation->set_select('parent_id', 0);?> ><?=$this->lang->line('none');?></option>
				<?php foreach ($categories as $category) { ?>
					<option value="<?=$category->id ?>" <?=$this->validation->set_select('parent_id', $category->id);?> ><?=$category->name ?></option>
				<?php  } ?>
			</select>
		</td>
	</tr>
	<tr>
		<td valign="top"><?=$this->lang->line('name');?><span class="required"> *</span></td>
		<td><input type="text" name="name" class="long_text" value="<?=$this->validation->name;?>"/>
		<?php echo $this->validation->name_error; ?></td>
	</tr>
	<tr>
		<td valign="top"><?=$this->lang->line('type');?><span class="required"> *</span></td>
		<td>
			<select id="type" name="type" class="medium_text" >
				<option value="1" <?=$this->validation->set_select('type', '1');?> ><?=$this->lang->line('type-product');?></option>
				<option value="2" <?=$this->validation->set_select('type', '2');?> ><?=$this->lang->line('type-news');?></option>
			</select>
		</td>
	</tr>
</table>
</div>
</form>